package com.cw.jeeyt.api.enums;

import java.util.Arrays;

/**
 * 参数类型枚举
 */
public enum EnumCommonParam {
    BASEREQUEST("BaseRequest","请求参数","com.cw.base.common.model.dto.base.BaseRequest","Rpc-Base-Request"),
    BASERUSEREQUEST("BaseUserRequest","user请求参数","com.cw.base.common.model.dto.base.BaseUserRequest","Rpc-Base-User-Request"),
    BASERESPONSE("BaseResponse","响应参数","com.cw.base.common.model.dto.base.BaseResponse",""),
    BASEPAGEREQUEST("BasePageRequest","分页请求参数","com.cw.base.common.model.dto.base.BasePageRequest",""),
    BASEPAGERESPONSE("BasePageResponse","分页响应参数","com.cw.base.common.model.dto.base.BasePageResponse",""),
    BASEMQREQUEST("BaseMqRequest","mq请求参数","com.cw.base.common.model.dto.base.BaseMqReqeust",""),
    BASELICENSEREQUEST("BaseLicenseRequest","mq请求参数","com.cw.base.common.model.dto.base.BaseLicenseReqeust",""),
    COMMONRESPONSE("CommonResponse","公共响应参数","com.cw.base.common.model.dto.response.CommonResponse",""),
    ;
    private String code;
    private String desc;
    private String fullPath;
    private String headerName;

    EnumCommonParam(String code, String desc,String fullPath,String headerName) {
        this.code = code;
        this.desc = desc;
        this.fullPath = fullPath;
        this.headerName = headerName;
    }
    public static EnumCommonParam find(String code) {
        return Arrays.stream(EnumCommonParam.values()).filter(input -> input.getCode().equals(code)).findFirst().orElse(null);
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public String getFullPath() {
        return fullPath;
    }

    public String getHeaderName() {
        return headerName;
    }
}
